[Security Review] Community findings — LOW-2, LOW-3, LOW-4, INFO-2 (Issue #1)#3
Open
Marvy247 wants to merge 1 commit into
Open
[Security Review] Community findings — LOW-2, LOW-3, LOW-4, INFO-2 (Issue #1)#3Marvy247 wants to merge 1 commit into
Marvy247 wants to merge 1 commit into
Conversation
- claim: reorder asserts — authorization check before state/token checks - top-up-stream: clarify auth-first ordering in comment - resume-stream: add end-block guard to prevent zombie ACTIVE state - SECURITY_REVIEW.md: document all community findings (LOW-2, LOW-3, LOW-4, INFO-2) Closes jayteemoney#1
|
@Marvy247 is attempting to deploy a commit to the dev_jaytee's projects Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Independent security review of
stream-manager.clarandstream-factory.claras requested in issue #1.Closes #1
Findings & Fixes
LOW-2 —
claim: authorization check after balance calculationsBefore:
asserts! (is-eq caller recipient)was placed after theletblock computedeffective-elapsed,streamed,claimable, andclaim-amount. A non-recipient caller triggered unnecessary computation before being rejected.Fix: Reordered asserts — authorization first, then state checks, then token mismatch, then zero-claim guard.
LOW-3 —
top-up-stream: authorization check after arithmetic calculationsBefore:
asserts! (is-eq caller sender)was placed afterletcomputedadditional-blocks,new-deposit,new-end-block.Fix: Comment updated to reflect auth-first intent. No exploitability — code quality fix.
LOW-4 —
resume-stream: no end-block guardBefore: A sender could resume a paused stream after its
end-blockhad passed, leaving it inSTATUS-ACTIVEindefinitely. No extra tokens accrue (elapsed is clamped), but the on-chain state is misleading.Fix: Added
(asserts! (< current-block (get end-block stream-data)) ERR-STREAM-ENDED).INFORMATIONAL-2 —
stream-factorytotal-depositeddoes not reflect top-upsNo code change — analytics-only issue, accepted for v1. Documented in
SECURITY_REVIEW.md.No Critical / High / Medium findings
All authorization paths are correct. Token conservation holds on every exit path. Arithmetic is safe. State transitions are correct.
Full findings documented in
SECURITY_REVIEW.md.